package com.chengyu.core.controller;


import com.chengyu.core.component.OperationLog;
import com.chengyu.core.entity.CommonPage;
import com.chengyu.core.entity.CommonResult;
import com.chengyu.core.exception.CommonException;
import com.chengyu.core.exception.ServiceException;
import com.chengyu.core.model.Franchise;
import com.chengyu.core.model.UmsMember;
import com.chengyu.core.request.PageParamRequest;
import com.chengyu.core.service.FranchiseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 * 援助 前端控制器
 * </p>
 *
 * @author wenlj
 * @since 2023-10-29
 */
@Api(tags = "招商加盟", description = "MemberAddressController")
@Controller
@RequestMapping("/franchise")
public class FranchiseController extends UserBaseController {
    @Autowired

    private FranchiseService FranchiseService;





    @ApiOperation(value = "添加编辑")
    @OperationLog
    @ResponseBody
    @RequestMapping(value = {"/add"}, method = RequestMethod.POST)
    public CommonResult<String> editSubmit(Franchise Franchise) throws CommonException, ServiceException {

        UmsMember member = getCurrentMember();
        Franchise.setMemberId(getCurrentMemberId());

        FranchiseService.pushFranchise(Franchise);
//		goodsService.publishGoodsNew(getCurrentShop(), publishForm);
        return CommonResult.success(null);
    }


}

